Crate pkgar_keys

source ·

Structs§

  • The default location for pkgar to look for the user’s public key.
  • The default location for pkgar to look for the user’s secret key.
  • The Error type.
  • Secure in-memory representation of a password.
  • Standard pkgar public key format definition. Use serde to serialize/deserialize files into this struct (helper methods available).
  • Standard pkgar private key format definition. Use serde. Internally, this struct stores the encrypted state of the private key as an enum. Manipulate the state using the encrypt(), decrypt() and is_encrypted().

Enums§

Traits§

  • Additional methods for Result, for easy interaction with this crate.

Functions§

  • Generate a new keypair. The new keys will be saved to file. The user will be prompted on stdin for a password, empty passwords will cause the secret key to be stored in plain text. Note that parent directories will not be created.
  • Get a SecretKeyFile from a path. If the file is encrypted, prompt for a password on stdin.
  • Open, decrypt, re-encrypt with a different passphrase from stdin, and save the newly encrypted secret key at skey_path.